
import { BUTTONID } from '../../constance';

function buttonControl(props, checkArr) {
        if (!checkArr || checkArr.length == 0) {
                // 没有选行
                props.button.setDisabled({
                        [BUTTONID.Add]: false,
                        [BUTTONID.Delete]: true,
                        [BUTTONID.Refresh]: false
                });
        } else {
                props.button.setDisabled({
                        [BUTTONID.Add]: false,
                        [BUTTONID.Delete]: false,
                        [BUTTONID.Refresh]: false
                });
        }
}

export { buttonControl };
